<template>
    <div>
        <span>{{title}}</span>
        <input 
        :type="type" 
        :name="title" 
        :value="value" 
        @input="$emit('input',$event.target.value)"
        :id="id" 
        :disabled="disabled" 
        :placeholder="placeholder">
        <!-- 广播input事件，v-model会接收次值 -->
    </div>
</template>

<script>
    export default {
        props: ['title','value','id','disabled','type','placeholder'],
        mounted(){
        }
    }
</script>

<style scoped>
div{
    width: 100%;
    border-bottom: 1px solid #E9E9E9;
    border-radius: .5rem;
}
div>span{
    display: inline-block;
    width: 30%;
    margin-left: 1rem;
    font-size: 1.1rem;
    line-height: 2.5rem;
}
div>input{
    width: 50%;
    height: 1.75rem;
    line-height: 1.5rem;
    font-size: 1rem;
    border: 1px solid #E9E9E9;
    text-indent: .5rem;
    color: #aaaaaa;
}
</style>